﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace QuangNgai.nhaplieu
{
    public partial class frmChiTietVBLKTD : DevExpress.XtraEditors.XtraForm
    {
        private frmChiTietVB fVB;
        public frmChiTietVBLKTD(frmChiTietVB f)
        {
            fVB = f;
            InitializeComponent();
        }

        private void frmChiTietVBLKTD_Load(object sender, EventArgs e)
        {
            this.dictionaryTableAdapter.Fill(this.lTQNDataSet.Dictionary);

        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            var curr = fVB.GvChiTietVB.Tag as LTQNDataSet.VanBanDetailRow;
            curr.FieldValue = ((dictionaryBindingSource.Current as DataRowView).Row as LTQNDataSet.DictionaryRow).IndexName;
            fVB.gvChiTietVB_KeyUp(null, new KeyEventArgs(Keys.Enter));
            this.Dispose();
        }
    }
}